package com.imooc.exception;

import com.imooc.enums.ResultEnum;

/**
 * Created by zhanglei on 2019/3/10.
 * 自定义异常
 */
public class OrderException extends RuntimeException {

    private Integer code;
    public OrderException(Integer code,String message) {
        super(message);
        this.code = code;
    }

    public OrderException(ResultEnum resultEnum) {
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

}
